def average(lst: list[float]):
    # result: float = 0
    # length = len(lst)
    # for value in lst:
    #    result += value / length
    # return result
    return sum(lst) / len(lst)


def _main():
    with open("学生成绩文件.txt", "r") as file_input:
        scores = [float(line.split()[2]) for line in file_input if line != ""]
    print(f"平均分：{average(scores)} 最低分：{min(scores)} 最高分：{max(scores)}")


if __name__ == "__main__":
    _main()
